package com.jt;

import com.sun.org.apache.xml.internal.resolver.helpers.PublicId;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.ParametersAreNonnullByDefault;

@SpringBootApplication
public class provider_RunApp {
    public static void main(String[] args) {
        SpringApplication.run(provider_RunApp.class,args);
    }

    @RestController
    public  class providerContoller
    {
        @Value("${server.port}")
        private  String port;

        @GetMapping("/provider/echo/{msg}")
        public  String consumer(@PathVariable String msg)
        {
            return  port+"say hello to "+msg;
        }
    }


}
